package com.ug;

import com.ug.common.utils.SpringContextHolder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @Author LY
 * @create 2024/7/16 15:04
 * @Description ug-admin-boot
 */
@EnableTransactionManagement
@SpringBootApplication
public class RunMain {

    private static final Logger logger = LoggerFactory.getLogger(RunMain.class);

    public static void main(String[] args) {
        SpringApplication.run(RunMain.class, args);
        logger.info("ug-admin boot start");
    }

    /**
     * 注册spring上下文对象
     */
    @Bean
    public SpringContextHolder springContextHolder(){
        return new SpringContextHolder();
    }
}
